package com.mav01.mrpbackend.mapper;

import com.mav01.mrpbackend.pojo.Bom;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface BomMapper {

    @Select("SELECT * FROM BOM WHERE part_no = #{partNo} ORDER BY level")
    List<Bom> selectByPartNo(String partNo);

    @Select("SELECT * FROM BOM ORDER BY level, part_no")
    List<Bom> selectAll();
}